package com.itheima.String;

public class String2 {
    public static void main(String[] args) {
        //1.字符串对象直接由""赋值方式产生,内容相同,则地址相同
        String s1 = "abc";
        String s2 = "abc";
        System.out.println(s1 == s2);
        //2.
        String s3 = "abc";
        String s4= new String("abc");
        System.out.println(s3 == s4);
        //3.
        String s5 = "ab";
        String s6 = s5 + "c";
        String s7= "abc";
        System.out.println(s7 == s6);
    }
}
